package com.huan.study.mongo.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;
import java.util.List;

/**
 * 用户
 *
 * @author huan.fu
 * @date 2018/4/16 - 15:14
 */
@Document(collection = "mongo_users")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User {

	@Id
	private String userId;
	@Field("new_age")
	private Integer age;
	private Date createTime;
	private List<String> hobbies;

	private User parent;

}
